module.exports = function (content, sourceMap) {
    var loaderUtils = require('loader-utils')
    var SourceNode = require('source-map').SourceNode;
    var SourceMapConsumer = require('source-map').SourceMapConsumer
    if(this.cableable){
        this.cacheable()
    }
    // source-map
    // 获取和打印options
    var options = loaderUtils.getOptions(this) || {};
    console.log('options', options);
    if(options.sourceMap && sourceMap){
        var currentRequest = loaderUtils.getCurrentRequest(this);
        var node = SourceNode.fromStringWithSourceMap(
            content, 
            new SourceMapConsumer(sourceMap)
        )
        node.prepend(useStrictPrefix)
        var result = node.toStringWithSourceMap({
            file: currentRequest
        });
        var callback = this.async();
        callback(null, result.code, result.map.toJSON());
    }
    // 不支持source-map的情况
    return useStrictPrefix + content
}